package com.lefevre.cms.bean.user;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 用户自定义注册功能项用户输入值
 *
 * @author Lefevre
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("user_input_value")
@Entity
@Table(name = "user_input_value", indexes = {@Index(name = "userinputvalue_idx", columnList = "userId,options")})
public class UserInputValue implements Serializable {
    private static final long serialVersionUID = 1793854183249250607L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @TableId(type = IdType.INPUT)
    private Long id;

    /**
     * 用户Id
     **/
    private Long userId;

    /**
     * 用户自定义注册功能项表Id
     **/
    @Column
    private Integer userCustomId;

    /**
     * 用户输入内容
     **/
    @Lob
    private String content;

    /**
     * 选项值
     **/
    @Column(length = 32)
    private String options = "-1";

}
